using System;
using KnessetCore.Members.Views;

namespace KnessetCore.Members.Views
{
	/// <summary>
	/// A view for the time data grids.
	/// </summary>
	public class TimeMemberView : MemberView
	{
		/// <summary>
		/// Total amount of time for a specific period.
		/// </summary>
		private readonly TimeSpan totalForTimePeriod;
		/// <summary>
		/// Average amount of time per day in a specific period.
		/// </summary>
		private readonly TimeSpan averageForTimePeriod;

		public TimeMemberView(string name, string imgLink, string knessetLink, TimeSpan totalForTimePeriod, TimeSpan averageForTimePeriod) : base(name, imgLink, knessetLink)
		{
			this.totalForTimePeriod = totalForTimePeriod;
			this.averageForTimePeriod = averageForTimePeriod;
		}


		/// <summary>
		/// Total amount of time for a specific period.
		/// </summary>
		public TimeSpan TotalForTimePeriod
		{
			get { return totalForTimePeriod; }
		}

		/// <summary>
		/// Average amount of time per day in a specific period.
		/// </summary>
		public TimeSpan AverageForTimePeriod
		{
			get { return averageForTimePeriod; }
		}
	}
}